﻿using System;
using System.Collections.Generic;
using Game.Lib;
using System.Net;
using System.Net.Sockets;
using System.Text;

namespace Simulator
{
    class Program
    {
        static void Main(string[] args)
        {
            UDPServer test = new UDPServer(new System.Net.IPEndPoint(IPAddress.Any, 4050));
            test.Start();
            while (true)
            {
                string message = Console.ReadLine();
                if (message == "exit") break;
                else
                {
                    IPEndPoint remote = new IPEndPoint(IPAddress.Loopback, UDPServer.GATEWAY);
                    test.Send((EndPoint)remote, Utils.GetBytes(message));
                }
            }
            test.Stop();
        }
    }
}
